home *** CD-ROM | disk | FTP | other *** search
/ Star Trek Starfleet Academy Mini Omnipedia / MINI_OMNI.ISO / pc / omni_v2.dxr / 00376_Text Acquisistion.ls < prev    next >
Encoding:
Text File  |  1996-04-15  |  1.3 KB  |  41 lines

  1. global gcurrentmedialist, gModeState, gFTsearchscope, gCurrNtryModeCode, gCurrEntryAttrib, gEntriesPath, gPDL, gPreStyledFlag
  2.  
  3. on hParseAttrib pWhatEntry
  4.   global gVoiceSearchText
  5.   set gVoiceSearchText to pWhatEntry
  6.   if gModeState = #FoundSet then
  7.     if gFTsearchscope = #ALL then
  8.       set gCurrNtryModeCode to hGetMode(pWhatEntry)
  9.     else
  10.       set gCurrNtryModeCode to gFTsearchscope
  11.     end if
  12.     set LthisItem to hConvertAlphaToItem(hFilterSearchChars(pWhatEntry))
  13.     set gCurrEntryAttrib to mFindThisNtrysAttribs(oIndexMediator, gCurrNtryModeCode, LthisItem, pWhatEntry)
  14.   end if
  15.   if voidp(gCurrEntryAttrib) then
  16.     return 0
  17.   end if
  18.   set gcurrentmedialist to []
  19.   repeat with i = 2 to 7
  20.     add(gcurrentmedialist, getAt(gCurrEntryAttrib, i))
  21.   end repeat
  22.   if max(gcurrentmedialist) <= 0 then
  23.     set gcurrentmedialist to []
  24.   end if
  25.   set LnomofChunks to getAt(gCurrEntryAttrib, 8)
  26.   set Lcastid to getAt(gCurrEntryAttrib, 9)
  27.   set Lcastitem to getAt(gCurrEntryAttrib, 10)
  28.   return hGetText(Lcastid, Lcastitem)
  29. end
  30.  
  31. on hGetText cstnum, cstitm
  32.   set tidl to the itemDelimiter
  33.   set the itemDelimiter to "~"
  34.   set temp to item cstitm of field cstnum
  35.   if temp = EMPTY then
  36.     put "!>hGetText got nothing."
  37.   end if
  38.   set the itemDelimiter to tidl
  39.   return temp
  40. end
  41.